]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
WindowOverlay: remove animations when relayouting
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 16 Feb 2013 16:26:28 +0000 (17:26 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 16 Feb 2013 18:08:02 +0000 (19:08 +0100)
If WindowOverlay.relayout() is called without animation, we must stop
any preexisting animation, otherwise it will continue to run with the
previous parameters and cause the overlay to end up in the wrong position.

https://bugzilla.gnome.org/show_bug.cgi?id=693970

js/ui/workspace.js

index 85fae08568f8749cd8db9903a81ce8af22539ad8..85387293e93ba342b88b5580663597627e81455d 100644 (file)
@@ -529,10 +529,15 @@ const WindowOverlay = new Lang.Class({
     },
 
     relayout: function(animate) {
-        let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot;
-
         let button = this.closeButton;
         let title = this.title;
+        let border = this.border;
+
+        Tweener.removeTweens(button);
+        Tweener.removeTweens(title);
+        Tweener.removeTweens(border);
+
+        let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot;
 
         let layout = Meta.prefs_get_button_layout();
         let side = layout.left_buttons.indexOf(Meta.ButtonFunction.CLOSE) > -1 ? St.Side.LEFT : St.Side.RIGHT;